package com.jubaopen.dao.ibatis;

import com.jubaopen.bean.SmsCharge;
import com.jubaopen.dao.SmsChargeDAO;

public class SmsChargeDAOImpl extends BaseIBatisDao implements SmsChargeDAO {

	@Override
	public int add(SmsCharge entity) {
		return (Integer) this.getSqlMapClientTemplate().insert(
				"SmsChargeMapper.insert", entity);
	}

	@Override
	public int updateById(SmsCharge entity) {
		return this.getSqlMapClientTemplate().update(
				"SmsChargeMapper.updateById", entity);
	}

	@Override
	public SmsCharge getOneById(int id) {
		return (SmsCharge) this.getSqlMapClientTemplate().queryForObject(
				"SmsChargeMapper.getById", id);
	}

	@Override
	public SmsCharge getOneByuserId(int userId) {
		return (SmsCharge) this.getSqlMapClientTemplate().queryForObject(
				"SmsChargeMapper.getByUserId", userId);
	}

}
